import React, { Component } from 'react'
import './shallow.scss'
import { PureComponent } from 'react'
export default class ShallowEqualReact extends PureComponent {
  state={
    ary:[1,2,3,4,5]
  }
  render() {
    return (
      <div style={{display:'flex'}}>
        {
            this.state.ary.map(item=><div key={item} className='box'>{item}</div>)
        }
        <div className='click' onClick={()=>{
            this.state.ary.push(6)
            this.setState({
                ary:[...this.state.ary]
            })
        }}>+</div>
      </div>
    )
  }
}
